#!/usr/bin/perl -w

use Data::Dumper;

use perlmod::camera2;



my $camera = perlmod::camera2->new();

my $return = $camera->begin();

if ( defined( $return ) ) {
	
	print "begin returned: $return\n";
	
}
else {
	
	print "begin returned undef\n";
	
}


$camera->{'threadipc'}->{'inputqueue'}->enqueue( [ "capture-image-and-download\n" ] );


sleep(10);

$camera->{'threadipc'}->{'inputqueue'}->enqueue( [ "quit\n" ] );

while ( $camera->status() ) {
	
	print "sleeping " . $camera->status() . "\n";
	sleep(1);
	
}

$camera->finish();
#print Dumper($camera);



